package ecs.dogear.app;

import java.util.ArrayList;

public class Comment {
    private int commentId;
	private String content;
	private String pageUrl;
	private String pageTitle;
	private ArrayList<Comment> replies = new ArrayList<Comment>();
	private int userId;

	public Comment(String content, String pageUrl,int commentId,int userId,String pageTitle) {
		this.content = content;
		this.pageUrl = pageUrl;
		this.commentId = commentId;
		this.userId = userId;
		this.pageTitle = pageTitle;
	}

	public int getUserId() {
		return userId;
	}

	public String getUrl() {
		return pageUrl;
	}

	public String getContent() {
		return content;
	}
    public int getCommentId(){
    	return commentId;
    }
	public void addReply(Comment comment) {
		if(replies.contains(comment))return;
		replies.add(comment);
	}

	public ArrayList<Comment> getReplies() {
		return replies;
	}

	public String getPageTitle() {
		return pageTitle;
	}
}
